/**
 * Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 *
 * For the applicable distribution terms see the license.txt -file, included in
 * the distribution.
 */

#ifndef SCREENSIZEPROVIDER_H
#define SCREENSIZEPROVIDER_H

#include <QMetaType>
#include <QObject>
#include <QRect>


class ScreenSizeProvider : public QObject
{
    Q_OBJECT
    Q_PROPERTY(int width READ width NOTIFY widthChanged)
    Q_PROPERTY(int height READ height NOTIFY heightChanged)

public:
    explicit ScreenSizeProvider(QObject *parent = 0);
    explicit ScreenSizeProvider(const ScreenSizeProvider &instance);
    virtual ~ScreenSizeProvider();

public:
    int width() const;
    int height() const;
    QRect size() const;

public slots:
    void update();

signals:
    void widthChanged(int width);
    void heightChanged(int height);

private:
    QRect m_screenRect;
};

Q_DECLARE_METATYPE(ScreenSizeProvider);


#endif // SCREENSIZEPROVIDER_H

// End of file.
